package cn.abcsys.cloud.devops.runtime.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.abcsys.cloud.devops.runtime.entity.Cluster;
/**
 * @author mayunhao
 * @date   June 15,2017
 */
public interface ClusterMapper {

	/**
	 * 创建
	 * @param Cluster
	 * @return
	 * @throws SQLException
	 */
	public int insertCluster(Cluster cluster) throws SQLException;

	/**
	 * 删除
	 * @param clusterId
	 * @return
	 * @throws SQLException
	 */
	public int deleteCluster(Integer clusterId) throws SQLException;

	/**
	 * 修改
	 * @param record
	 * @return
	 * @throws SQLException
	 */
	public int updateCluster(Cluster record) throws SQLException;

	/**
	 * 集群详情
	 * @param clusterId
	 * @return
	 * @throws SQLException
	 */
	public Cluster getClusterDetail(Integer clusterId) throws SQLException;

	/**
	 * 批量查询
	 * @param type
	 * @param tenantId
	 * @return
	 * @throws SQLException
	 */
	public List<Cluster> selectClusterList(Map map) throws SQLException;
	/**
	* @Title: selectClusterListByEnvId 
	* @Description: 根据环境Id查询集群 
	* @param @param envId
	* @param @return    设定文件 
	* @return List<Cluster>    返回类型 
	* @throws
	 */
	public List<Cluster> selectClusterListByEnvId(@Param("envId")Integer envId) throws SQLException;

}
